package com.mspbots.core.ticketai.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonNode;
import com.mspbots.core.wise.model.TenantEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * com.mspbots.core.ticket.TenantTicket
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/8/8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tenant_tickets", autoResultMap = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Ticket extends TenantEntity {

    private String updatedBy;
    private Long cwId;
    private Long boardId;
    private Integer statusId;
    private String status;
    private Integer priorityId;
    private String priorityName;
    private Integer companyId;
    private Integer contactId;
    private String contactTitle;
    private String contactName;
    private String summary;
    private String resources;
    private Long owner;
    private Double order;
    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
    private LocalDateTime syncTime;
    private String companyName;

    private JsonNode extend;
    private JsonNode auditor;
    private JsonNode teamRoles;

    private String recordType;
    private String subBillingMethod;
    private String locationName;

    private transient Long tenantUserId;
    private transient String tnantUserName;
    private transient LocalDateTime updatedTimeStart;
    private transient Boolean ownerNull;

    private transient List<Long> boardIds;
    private transient List<Long> statusIds;

    @TableField(exist = false)
    private String team;

    @TableField(exist = false)
    private List<String> teamList;

    @TableField(exist = false)
    private Long ticketsCount;

    @TableField(exist = false)
    private Long clickedCount;

    @TableField(exist = false)
    private Long rate;

    @TableField(exist = false)
    private LocalDateTime dateFrom;

    @TableField(exist = false)
    private LocalDateTime dateTo;

    @TableField(exist = false)
    private Integer dataTotal;
}
